
{% load i18n %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="/media/css/flexigrid.pack.css" />
		<script src="/media/jslib/jquery.js"></script>
		<style>
		</style>
			{% block custom_css %}
			{% endblock %}  
	
		
		<script type="text/javascript">

		</script>
	</head>
<body style=" background:white;">
{% block content %}
			<!-- grid start -->
           <div  id="id_main_div" style="margin:0px;">
				<table class="m_grid" style="display: none"></table>
           </div>
		   <!-- grid end -->
		   <iframe id="export_ifm" width="0" height="0"></iframe>
{% endblock %}
</body>
<script type="text/javascript" src="{{ MEDIA_URL }}/jslib/jquery.validate.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}/jslib/i18n.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}/jslib/i18n_{{ LANGUAGE_CODE }}.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}/jslib/flexigrid.pack.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}/jslib/m.gridutils.js" type="text/javascript"></script>
<script>

        {% autoescape off %}
		    var urlparams = {{urlparams}};
//			var bg_params = "/grid/{{app_label}}/{{model_name}}/?export&reportname={{model_name}}&";
			var bg_params = "/grid/{{app_label}}/{{model_name}}/?export&reportname={{verbose_name}}&";
			var hide_list = {{hide_list}};
			var $p = $(document);
			var m_util = new gridUtil($p,bg_params,hide_list);
			m_util.m_params = urlparams

			var m_option = {{grid_option}};
			m_option["params"] = urlparams;
			m_obj = $(".m_grid",$p).flexigrid(m_option);
        {% endautoescape %}
		function resize(){
			get_cur_util().get_grid().flexResize(document.body.clientWidth, 348);
		}
		function pageload(){
			m_parent = $(window.parent.document)
			m_parent.find("#id_page_load").hide();
			//特殊处理 iframe session 过期后 刷新整个界面,重新登录
			var title_flag = $("title");
			if(title_flag.length>0 && title_flag.html().indexOf("登录")!=-1){
				alert("会话已经超时,请重新登录!");
				m_parent.location.reload();
			}
			resize();
		}
		if(window.XMLHttpRequest){window.onresize = resize;}
		window.onload = pageload;
</script>
    {% include "site_medias_js.html" %}
    {% include "site_medias_css.html" %}
	{% block custom_js %}
	
	{% endblock %}  
</html>